
export enum HttpStatusCodeEnum {
    Ok = 200,
    NotFound = 404,
    Error = 500,
}

export interface HttpResponse {
    message: string;
    success: boolean;
    data: any;
    statusCode: HttpStatusCodeEnum;
}

export type HttpResponsePromise = Promise<HttpResponse>;

export enum ThemeEnum {
  Light = 'light',
  Dark = 'dark',
}


export type ThemeType = ThemeEnum.Light | ThemeEnum.Dark

export interface Theme {
  theme: ThemeType
}

export interface Wallpaper {
  _id?: string;
  name: string;
  external: string;
  type: string;
  mime: string;
  uri: string;
  available: boolean;
  width: number;
  height: number;
  size: number;
  hash: string;
  quality: string;
  bucket: string;
  uploader: string;
  isPublished: boolean;
  createdAt: string;
  updatedAt: string;
}

export interface WallpaperType {
  key?: string;
  _id: string;
  title: string;
  name: string;
  path: string;
  icon: string;
  createdAt: Date|string;
  updatedAt: Date|string;
}

export interface WallpaperTypeListParams {
  pageNo: number;
  limit: number;
  keyword?: string;
}

export interface WallpapersParams {
  pageNo: number;
  limit: number;
  keyword?: string;
  type?: string;
}

export enum ContextMenuItemAction {
  Download = 'download',
  Preview = 'preview',
  SetWallpaper = 'setWallpaper',
}

export interface ContextMenuData {
  target: HTMLElement
}
export interface ContextMenuItem {
  icon: JSX.Element;
  label: string;
  // action: ContextMenuItemAction,
  onClick: (event: Event, data: ContextMenuData) => void;
  // data: Record<string, any>;
}

export enum WallpaperQuality {
  Low = 'low',
  Middle = 'middle',
  High = 'high',
}

export enum DownloadEvent {
  WillDownload = 'will-download',
  Downloading = 'downloading',
  Download = 'download',
  DownloadDone = 'download-done',
}
